<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn"  uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="security"
	uri="http://www.springframework.org/security/tags"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Market App</title>

</head>
<body>
	<h2>
		<fmt:message key="home_title" />
	</h2>
	<%-- <p>
		Dear,<security:authentication property="name" />.
		You have logged on <fmt:formatDate value="${today}" pattern="dd-MM-yyyy" />
	</p> --%>
	<br class="clearfix">
	<div id="sensexData" style="font: bold;">
		<table width="660" cellpadding="0" cellspacing="0">
			<tr>
				<th colspan="9"
					style="background-color: #209D9D; font: bold; font-size: 14pt; font-family: sans-serif; color: #E9F2EB;">Market
					Radar</th>
			</tr>
			<tr>
				<td
					style="font: bold; font-size: 12pt; font-family: sans-serif; color: #007D7D">SENSEX</td>
				<c:forEach items="${quoteMapBSE}" var="bsequote">
					<c:if test="${bsequote.key == 'last'}">
						<td
							style="font: bold; font-size: 14pt; font-family: sans-serif; color: #007D7D">${bsequote.value}</td>
					</c:if>
				</c:forEach>
				<c:forEach items="${quoteMapBSE}" var="bsequote">
					<c:if test="${bsequote.key == 'change'}">
						<fmt:parseNumber value="${bsequote.value}" var="changebsequote"
							integerOnly="false" type="number"></fmt:parseNumber>
						<c:if test="${changebsequote <= 0}">
							<!-- <td><img src="/images/down.png" alt="down"></td> -->
							<td style="font: bold; font-size: 14pt; font-family: sans-serif; color: #AF1E2D">${changebsequote}</td>
						</c:if>
						<c:if test="${changebsequote > 0}">
							<!-- <td><img src="/images/up.png" alt="up"></td> -->
							<td style="font: bold; font-size: 14pt; font-family: sans-serif; color: #007D7D">+ ${changebsequote}</td>
						</c:if>
					</c:if>
				</c:forEach>
				<td
					style="font: bold; font-size: 12pt; font-family: sans-serif; color: #007D7D">NIFTY</td>
				<c:forEach items="${quoteMapNSE}" var="nsequote">
					<c:if test="${nsequote.key == 'last'}">
						<td
							style="font: bold; font-size: 14pt; font-family: sans-serif; color: #007D7D">${nsequote.value}</td>
					</c:if>
				</c:forEach>
				<c:forEach items="${quoteMapNSE}" var="nsequote">
					<c:if test="${nsequote.key == 'change'}">
					<fmt:parseNumber value="${nsequote.value}" var="changensequote"
							integerOnly="false"></fmt:parseNumber>
						<c:if test="${changensequote <= 0}">
							<!-- <td><img src="/images/down.png" alt="down"></td> -->
							<td style="font: bold; font-size: 14pt; font-family: sans-serif; color: #AF1E2D">${changensequote}</td>
						</c:if>
						<c:if test="${changensequote > 0}">
							<!-- <td><img src="/images/up.png" alt="up"></td> -->
							<td style="font: bold; font-size: 14pt; font-family: sans-serif; color: #007D7D">+ ${changensequote}</td>
						</c:if>
					</c:if>
				</c:forEach>
				<td><a href="" onclick="refreshRadar();"><img src="/images/refresh.png" alt="Refresh"></a></td>
			</tr>
		</table>
	</div>
	<br class="clearfix">
	<div id="marketreports" style="font: bold;">
		<script type="text/javascript"
			src="http://p3k.org/rss/index.js?url=http%3A%2F%2Fwww.moneycontrol.com%2Frss%2Fmarketreports.xml&amp;maxItems=1&amp;width=660&amp;radius=5&amp;frameColor=%23209D9D&amp;titleBarColor=%23209D9D&amp;titleBarTextColor=%23E9F2EB&amp;boxFillColor=%23F5F5F5&amp;textColor=%23007D7D&amp;linkColor=%232c7395&amp;fontFace=12pt%20sans-serif&amp;compact=true&amp;showXmlButton=true"></script>
	</div>
	<br class="clearfix">
	<div id="business_news" style="float: left;">
		<script type="text/javascript"
			src="http://p3k.org/rss/index.js?url=http%3A%2F%2Fwww.moneycontrol.com%2Frss%2Fbusiness.xml&amp;maxItems=13&amp;width=300&amp;radius=5&amp;frameColor=%23209D9D&amp;titleBarColor=%23209D9D&amp;titleBarTextColor=%23E9F2EB&amp;boxFillColor=%23F5F5F5&amp;textColor=%23007D7D&amp;linkColor=%232c7395&amp;fontFace=8pt%20sans-serif&amp;compact=true&amp;showXmlButton=true"></script>
	</div>
	<div id="latest_news" style="float: right;">
		<script type="text/javascript"
			src="http://p3k.org/rss/index.js?url=http%3A%2F%2Fwww.moneycontrol.com%2Frss%2Flatestnews.xml&amp;maxItems=5&amp;width=300&amp;radius=5&amp;frameColor=%23209D9D&amp;titleBarColor=%23209D9D&amp;titleBarTextColor=%23E9F2EB&amp;boxFillColor=%23F5F5F5&amp;textColor=%23007D7D&amp;linkColor=%232c7395&amp;fontFace=8pt%20sans-serif&amp;compact=true&amp;showXmlButton=true"></script>
	</div>
	<div id="latest_news" style="float: right; margin-top: 2%;">
		<script type="text/javascript"
			src="http://p3k.org/rss/index.js?url=http%3A%2F%2Fwww.moneycontrol.com%2Frss%2Fbrokeragerecos.xml&amp;maxItems=5&amp;width=300&amp;radius=5&amp;frameColor=%23209D9D&amp;titleBarColor=%23209D9D&amp;titleBarTextColor=%23E9F2EB&amp;boxFillColor=%23F5F5F5&amp;textColor=%23007D7D&amp;linkColor=%232c7395&amp;fontFace=8pt%20sans-serif&amp;compact=true&amp;showXmlButton=true"></script>
	</div>

</body>
</html>